home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ASTRONOM / H256.ZIP / YALESTAR.ZIP / STAR.BAS next >
BASIC Source File  |  1993-06-01  |  5KB  |  107 lines

  1. 10 REM
  2. 20 REM  STAR  JULY 15.1, 1981
  3. 30 REM        this program reads data from star catalog and prints it
  4. 40 REM 
  5. 50 PRINT
  6. 60 PRINT TAB(25);"STAR CATALOG"
  7. 70 PRINT
  8. 80 INPUT "What is the Yale Bright Star Number of the Star you want Info on";I
  9. 90 I=ABS(INT(I))
  10. 100 REM
  11. 110 REM    HOPEFULLY THE CORRECT DATA DISK IN IN THE CORRECT DRIVE
  12. 120 REM
  13. 130 IF I<=884 THEN OPEN "I",#1,"STAR1.DAT":GOTO 260
  14. 140 IF I<=2059 THEN OPEN "I",#1,"STAR2.DAT":GOTO 260
  15. 150 IF I<=3234 THEN OPEN "I",#1,"STAR3.DAT":GOTO 260
  16. 160 IF I<=4409 THEN OPEN "I",#1,"STAR4.DAT":GOTO 260
  17. 170 IF I<=5584 THEN OPEN "I",#1,"STAR5.DAT":GOTO 260
  18. 180 IF I<=6759 THEN OPEN "I",#1,"STAR6.DAT":GOTO 260
  19. 190 IF I<=7934 THEN OPEN "I",#1,"STAR7.DAT":GOTO 260
  20. 200 IF I<=9110 THEN OPEN "I",#1,"STAR8.DAT":GOTO 260
  21. 210 PRINT "invalid star number, try again"
  22. 220 GOTO 80
  23. 230 REM
  24. 240 REM        FIND THE STAR
  25. 250 REM
  26. 260 INPUT #1,A$
  27. 270 A=VAL(LEFT$(A$,4))
  28. 280 IF A<>I THEN 260
  29. 290 REM
  30. 300 REM        PRINT THE DATA
  31. 310 REM
  32. 320 PRINT "yale Bright Star (BS) Number       = ";LEFT$(A$,4)
  33. 330 PRINT "Flamsteed Number                   = ";MID$(A$,5,3)
  34. 340 PRINT "Name                               = ";MID$(A$,8,7)
  35. 350 PRINT "Sign of Bonner Durchmusterung (BD) = ";MID$(A$,15,1)
  36. 360 PRINT "DM Number                          = ";MID$(A$,16,7)
  37. 370 PRINT "Henry Draper (HD) Number)          = ";MID$(A$,23,6)
  38. 380 PRINT "Boss General Catalog (GC) Number   = ";MID$(A$,29,5)
  39. 390 PRINT "Trig. Parallax Catalog Number      = ";MID$(A$,34,4)
  40. 400 PRINT "Radial Velocity Catalog Number     = ";MID$(A$,38,6)
  41. 410 PRINT "Double Star Catalog                = ";MID$(A$,44,1)
  42. 420 PRINT "Double Star Catalog Number         = ";MID$(A$,45,5)
  43. 430 PRINT "Multiple Star Componet Index       = ";MID$(A$,50,2)
  44. 440 PRINT "Variable Star Cat #    = ";MID$(A$,52,8)
  45. 450 PRINT "Right Ascension (1900.0)"
  46. 460 PRINT "     Hours             = ";MID$(A$,60,2)
  47. 470 PRINT "     Minutes           = ";MID$(A$,62,2)
  48. 480 PRINT "     seconds           = ";MID$(A$,64,2)
  49. 490 PRINT "     sign of 10 yr ch  = ";MID$(A$,66,1)
  50. 500 PRINT "     10 yr change (sec)= ";MID$(A$,67,3)
  51. 510 PRINT "Declination (1900.0)"
  52. 520 PRINT "     Sign              = ";MID$(A$,70,1)
  53. 530 PRINT "     Degrees           = ";MID$(A$,71,2)
  54. 540 PRINT "     Minutes           = ";MID$(A$,73,2)
  55. 550 PRINT "Galactic Longitude"
  56. 560 PRINT "     Degrees           = ";MID$(A$,75,3)
  57. 570 PRINT "     Minutes           = ";MID$(A$,78,2)
  58. 580 PRINT "Galactic Latitude"
  59. 590 PRINT "     Sign              = ";MID$(A$,80,1)
  60. 600 PRINT "     Degrees           = ";MID$(A$,81,2)
  61. 610 PRINT "     Minutes           = ";MID$(A$,83,2)
  62. 620 PRINT "BS-HR Number           = ";MID$(A$,85,4)
  63. 630 PRINT "Right Ascension (epoch 2000.0)"
  64. 640 PRINT "     Hours             = ";MID$(A$,89,2)
  65. 650 PRINT "     Minutes           = ";MID$(A$,91,2)
  66. 660 PRINT "     Seconds           = ";MID$(A$,93,2)
  67. 670 PRINT "  Change in Right Ascension (epoch 2000.0 - 1900.0)"
  68. 680 PRINT "     Sign              = ";MID$(A$,95,1)
  69. 690 PRINT "     Minutes           = ";MID$(A$,96,2)
  70. 700 PRINT "     Seconds           = ";MID$(A$,98,2)
  71. 710 PRINT "Declination (2000.0)"
  72. 720 PRINT "     Sign              = ";MID$(A$,100,1)
  73. 730 PRINT "     Degrees           = ";MID$(A$,101,2)
  74. 740 PRINT "     Minutes           = ";MID$(A$,103,2)
  75. 750 PRINT "  Change in Declination (epoch 2000.0 - 1900.0)"
  76. 760 PRINT "     Sign              = ";MID$(A$,105,1)
  77. 770 PRINT "     Minutes           = ";MID$(A$,106,2)
  78. 780 PRINT "Visual Magnitude       = ";MID$(A$,108,2);".";MID$(A$,110,2)
  79. 790 PRINT "Source                 = ";MID$(A$,112,2)
  80. 800 PRINT "Color                  = ";MID$(A$,114,2);".";MID$(A$,116,2)
  81. 810 PRINT "Spectral Class         = ";MID$(A$,118,22)
  82. 820 PRINT "Annual Proper Motion in Right Ascension"
  83. 830 PRINT "                       = ";MID$(A$,140,2);".";MID$(A$,142,3)
  84. 840 PRINT "Annual Proper Motion in Declination"
  85. 850 PRINT "                       = ";MID$(A$,145,2);".";MID$(A$,147,3)
  86. 860 PRINT "Parallax               = ";MID$(A$,150,1);"0.";MID$(A$,151,3)
  87. 870 PRINT "D if Dynamical Parallax= ";MID$(A$,154,1)
  88. 880 PRINT "Radial Velocity        = ";MID$(A$,155,6)
  89. 890 PRINT "Double Star Data"
  90. 900 PRINT "     Magnitude Diff    = ";MID$(A$,161,2);".";MID$(A$,163,1)
  91. 910 PRINT "     Maxium Separation = ";MID$(A$,164,3);".";MID$(A$,167,1)
  92. 920 PRINT "     # of Componets    = ";MID$(A$,168,1)
  93. 930 PRINT "     Remarks           = ";MID$(A$,169,2)
  94. 940 PRINT "Data in Radians"
  95. 950 PRINT "Right Ascension (1900) = ";MID$(A$,171,8)
  96. 960 PRINT "Declination (1900)     = ";MID$(A$,179,8)
  97. 970 PRINT "Right Ascension (2000) = ";MID$(A$,187,8)
  98. 980 PRINT "Declination (2000)     = ";MID$(A$,195,8)
  99. 990 REM
  100. 1000 REM    CLOSE THE INPUT FILE, AND SERVICE ANY ADDITIONAL REQUESTS
  101. 1010 REM
  102. 1020 CLOSE
  103. 1030 GOTO 70
  104. 1040 END
  105. 8)
  106. 990 REM
  107. 1000 REM    CLOSE THE INPUT FI